//
// DO NOT MODIFY THIS FILE - it is generated using templatec on FileInvalidator.t
//
package lpg;

import java.io.PrintWriter;
import lpg.util.DispatchWriter; /* FileInvalidator.t:1 */

class FileInvalidator
{
    private PrintWriter out = null;

    public void setOut(PrintWriter pw)
    {
        out = pw;
    }

    void run(Option option, String filename, String filetype) /* FileInvalidator.t:2 */
    {
        out.write("\n"); /* FileInvalidator.t:1~2 */
        out.write("\n//--"); /* FileInvalidator.t:2~3 */
        out.print(filename); /* FileInvalidator.t:3 */
        out.write("\n"); /* FileInvalidator.t:3~4 */
        if (option.programmingLanguage != Option.ProgrammingLanguage.JAVA) /* FileInvalidator.t:5 */
            return; /* FileInvalidator.t:6 */

        if (option.packageName.length() > 0) /* FileInvalidator.t:8 */
        { /* FileInvalidator.t:9 */
            out.write("package "); /* FileInvalidator.t:10 */
            out.print(option.packageName); /* FileInvalidator.t:10 */
            out.write(";\n\n"); /* FileInvalidator.t:10~12 */
        } /* FileInvalidator.t:13 */
        out.write("/**\n * This class is invalid because LPG stopped while processing\n * the grammar file \""); /* FileInvalidator.t:14~16 */
        out.print(option.grmFile); /* FileInvalidator.t:16 */
        out.write("\"\n */\npublic class Bad"); /* FileInvalidator.t:16~18 */
        out.print(filetype); /* FileInvalidator.t:18 */
        out.write(" {}\n"); /* FileInvalidator.t:18~19 */
    }

}
